# $Id: PKGBUILD 67639 2012-03-13 14:58:25Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Mathijs Kadijk <mkadijk@gmail.com>

pkgname=mytop
pkgver=1.7
pkgrel=1
pkgdesc="A top clone for MySQL"
arch=(any)
url="https://github.com/jzawodn/mytop"
depends=('perl' 'perl-term-readkey' 'perl-dbd-mysql')
license=('GPL')
options=('!emptydirs')
source=(http://arch.p5n.pp.ru/~sergej/dl/2012/mytop-$pkgver-20120313.zip)
md5sums=('9f8f407802b399b29aeff745141b03f0')

build() {
  cd "`find $srcdir -type d -name 'jzawodn-mytop-*'`"

  perl Makefile.PL
  make
  make DESTDIR=$pkgdir install
  mv $pkgdir/usr/bin/site_perl/mytop $pkgdir/usr/bin/mytop
  sed -i 's#"long|!"#"long!"#' $pkgdir/usr/bin/mytop

  find $pkgdir -name '.packlist' -delete
  find $pkgdir -name '*.pod' -delete
}
